data(penguins)Warning in data(penguins): data set 'penguins' not found
Today you will be exploring different types of visualizations to uncover which species of penguins reside on different islands.
Some advice:
If you aren’t sure how to make a specific plot or how to customize a look over the class text for this week and make use of the R graphics cheat sheets.
Google and ChatGPT are your friend! If you aren’t sure how to accomplish a certain type what you are trying to accomplish into Google and see what other people are saying. Generally, adding ggplot to the end of your search will help make your search results more relevant!
Insert blurb on how students are expected to collaborate.
palmerpenguins PackageWe will be creating visualizations using the ggplot2 package.
For this activity, we will be exploring the penguins data from the palmerpenguins package, which has fantastic documentation with really awesome artwork. So, you will need to install the palmerpenguins package. Run the following code in your console:
install.packages("palmerpenguins")
setup (with the hashpipe #|)#|) that the messages from loading in the packages should not be included.tidyverse or ggplot2 package.palmerpenguins package.penguins DatasetI like to tangibly see the data set I will be working with so let’s pull the penguins data into the R environment. Run the code below and you should see the penguins data appear in the top right Environment tab.
data(penguins)Warning in data(penguins): data set 'penguins' not found
In this section you will explore the penguins dataset by creating multiple types of plots. As you are creating you plots, please don’t forget to (1) give your plots reader friendly axes labels, and. (2) follow good code formatting!
Use ggplot2 to draw a barchart of different species included in the dataset.
Use ggplot2 to create a scatterplot of the relationship between the bill length (bill_length_mm) and bill depth (bill_depth_mm).
Building off of the plot you made in Step 6, add an aesthetic to differentiate the species of the penguins in the scatterplot by color.
island) to your visualization. There may be more than one method to address this, however, one method will more easily allow you to address the questions below.Use the plots you created to address the following questions on Canvas:
Which species of penguins is represented the least in the penguins data set?
Which species of penguins are found on Biscoe Island?
Which species of penguins are found on Dream Island?
Which species of penguins are found on Torgersen Island?
Color deficiencies can make differentiating groups difficult—what aesthetic could you add to your plot to double encode species?